<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<%@include file="/WEB-INF/jsp/includes/common.jsp" %>
		<%@include file="/WEB-INF/jsp/includes/head.jsp" %>
	</head>
	<body>
		<div id="app-act" class="app-act">
			<jsp:include page="/WEB-INF/jsp/includes/nav.jsp" flush="false">
				<jsp:param value="true" name="activityFlag"/>
				<jsp:param value="false" name="drawFlag"/>
			</jsp:include>
			<!-- begin update -->
			<div id="activeList">
				<div class="mod-wrapper">
					<div class="mod-hd mb10">
						<div class="top-box">
							<img src="${resUrlPrefix }/images/top.jpg" width="770" height="156" />
						</div>
					</div>
					<div class="mod-bd">
						<div class="tab clearfix">
							<ul class="clearfix fl">
							<c:if test="${pageOrder=='pageActive' || pageOrder == null}">
							<li><a href="${postUrlPrefix }activity/index.do?pageOrder=pageActive" class="tab-item active">全部活动</a></li>
							<li><a href="${postUrlPrefix }activity/index.do?pageOrder=byEndTime" class="tab-item">即将结束</a></li>
							<li><a href="${postUrlPrefix }activity/index.do?pageOrder=byDrawNum" class="tab-item">参与热度</a></li>
							</c:if>
							<c:if test="${pageOrder=='byEndTime'}">
							<li><a href="${postUrlPrefix }activity/index.do?pageOrder=pageActive" class="tab-item">全部活动</a></li>
							<li><a href="${postUrlPrefix }activity/index.do?pageOrder=byEndTime" class="tab-item active">即将结束</a></li>
							<li><a href="${postUrlPrefix }activity/index.do?pageOrder=byDrawNum" class="tab-item">参与热度</a></li>
							</c:if>
							<c:if test="${pageOrder== 'byDrawNum'}">
							<li><a href="${postUrlPrefix }activity/index.do?pageOrder=pageActive" class="tab-item">全部活动</a></li>
							<li><a href="${postUrlPrefix }activity/index.do?pageOrder=byEndTime" class="tab-item">即将结束</a></li>
							<li><a href="${postUrlPrefix }activity/index.do?pageOrder=byDrawNum" class="tab-item active">参与热度</a></li>
							</c:if>
							
							</ul>
						</div>
					<div class="content">
						<div class="active-list">
							<c:if test="${page.total>0 }">
								<c:forEach var="active" items="${page.getData()}">
									<div class="list-item">
										<div class="item-cont clearfix">
											<div class="cont-left fl">
												<p class="img-wrapper">
													<img src="${active.image1}" style=" width:120px;height:90px"/>
												</p>
											</div>
											<div class="cont-center fl">
												<div>
													<c:if test="${active.endFlag>0}">
														<a href="${postUrlPrefix }draw/toDraw.do?activeId=${active.id}"class="fs14 fb qb-link2">${active.activeName}</a>
													</c:if>
													<c:if test="${active.endFlag<0}">
														<span class="fs14 fb qb-link1">${active.activeName}</span>
													</c:if>
												</div>
												<p class="center-tp">${active.memo}</p>
												<i class="line">&nbsp;</i>
												<p class="center-bt">
													<span>奖品数量：<b>${active.awardCount}</b></span>
													<span>参与：<b>${active.drawNum}</b></span>
												</p>
											</div>
											<div class="cont-right fl">
												<c:if test="${active.endFlag>0}">
													<a href="${postUrlPrefix }draw/toDraw.do?activeId=${active.id}" class="play-btn play-btn1">立即参与</a>
													<div class="join-num fr">
														<c:if test ="${active.endFlag>0}">
															
																<c:if test="${active.endFlag > 86400000}">
																<span>时间：
																	<b>${active.frontStartTime} - ${active.frontEndTime}</b>
																</span>
																</c:if>
																<c:if test="${active.endFlag < 86400000}">
																<span>倒计时：
																	<b class="down-time" endFlag="${active.endFlag}">00:00:00</b>
																</span>
																</c:if>
														</c:if>
													</div>
												</c:if>
												<c:if test="${active.endFlag<0}">
													<span class="play-btn play-btn2">活动结束</span>
												</c:if>
											</div>
										</div>
									</div>
								</c:forEach>
								<c:if test="${page.total<=0 }">
									<tr class="no-results">
										<td colspan="100%">未查询到结果！</td>
									</tr>
								</c:if>
							</c:if>
						</div>
					</div>
					<div class="mod-ft">
						<div class="mod-page-bar clearfix">
							<ul class="fr">
								<c:if test="${page.total>0 }">
									<c:if test="${page.total>5}">
										<nad:pagebar page="${page }" bar="${bar }" action="${postUrlPrefix }activity/index.do" />
									</c:if>
								</c:if>
							</ul>
						</div>
					</div>
					
				</div>
				<!-- end update -->
			</div>
		</div>
	</div>
		<!-- active-list.js -->
		<script type="text/javascript" src="${resUrlPrefix }js/activelist.js"></script>
	</body>
</html>


